Computer programs (or applications) are created using programming languages. These programming languages include human-readable text which are translated by a compiler to generate machine-readable instructions. In particular, the compiler translates each line of the programming language into a sequence of machine-readable instructions, which perform the logical task described by the line of programming language code.
During the course of programming, errors may occur due to programmer error. These errors include either syntax errors or logic errors. Syntax errors are caught by the compiler, which refuses to generate machine instructions for a line of programming language that it does not understand. Logic errors are caught by detecting that the program does not perform as expected, often resulting in program exceptions or incorrect behavior. While syntax errors can be corrected by determining the correct syntax, logic errors are often much more difficult to ascertain. For this reason, a special class of computer programs was developed. These programs are called debuggers. A debugger allows the user to trace through the user's own program, while it is executing on the computer, often in the original human-readable text format originally used in the programming language. This allows the programmer to determine the instance or instances where the logical flow of the program is incorrectly designed.
Several features are common to many debuggers, including, for instance, the ability to step through the code line by line, the ability to display the current value of variables, as well as the ability to execute until the program hits a set breakpoint at a selected point in the program. This breakpoint is often associated with a specific line number in the human-readable text, and is referred to herein as a line breakpoint.
Typically, the debugging process is iterative, often requiring the re-execution of a program after minor modifications to the code. Thus, it is convenient for the debugger to restore the line breakpoint in each consecutive execution of the program.
Several debuggers perform this task. However, these debuggers restore the breakpoint to the exact same line as the original line breakpoint was set. The disadvantage of this approach is that during the debugging process, the programmer will often change the code slightly to determine where the flaw is within the program. Because this will change the line number of the intended location of the saved breakpoint, the programmer is required to manually reset the breakpoint upon each iteration of debugging. This task is time consuming and error prone.
Thus, a need exists for an improved debugger. In particular, a need exists for a debugger that does not require a manual resetting of the breakpoint on each re-execution of the program.